# coding=utf-8

# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.


import os
import sys

curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)
sys.path.append(curPath)
from log.logUtils import logger


def print_hi(name):
    # Use a breakpoint in the code line below to debug your script.
    print(f'Hi, {name}')  # Press Ctrl+F8 to toggle the breakpoint.


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    print_hi('PyCharm')

# See PyCharm help at https://www.jetbrains.com/help/pycharm/

if __name__ == '__main__':
    logger.info("==========================start============================")
    execFilePath = os.path.dirname(__file__) + '/testcase'
    # 追加logging
    # D:\user\workspace\py_workspace\APIAutomationFramework\testcase
    # execfile = execFilePath + '/test_API.py'

    # execfile = r'D:/user/workspace/py_workspace/APIAutomationFramework/testcase/test_API.py'
    execfile = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'testcase', 'test_API.py')
    python_install_cmd = os.path.join(sys.path[10], 'python.exe')
    os.system("python " + execfile)
    # os.system(python_install_cmd + " " + execfile)
